<?php


class StreamingServer extends CActiveRecord
{
	
	public function tableName()
	{
		return 'streaming_server';
	}

	
	public function rules()
	{
		
		
		return array(
			array('url, status, description', 'required'),
			array('status', 'numerical', 'integerOnly'=>true),
			array('url', 'length', 'max'=>150),
			array('description', 'length', 'max'=>200),
			
			
			array('id, url, status, description', 'safe', 'on'=>'search'),
		);
	}

	
	public function relations()
	{
		
		
		return array(
			'vodStreams' => array(self::HAS_MANY, 'VodStream', 'server_id'),
		);
	}

	
	public function attributeLabels()
	{
		return array(
			'id' => 'ID',
			'url' => 'Url',
			'status' => 'Status',
			'description' => 'Description',
		);
	}

	
	public function search()
	{
		

		$V0v5vsnfxezw=new CDbCriteria;

		$V0v5vsnfxezw->compare('id',$this->id);
		$V0v5vsnfxezw->compare('url',$this->url,true);
		$V0v5vsnfxezw->compare('status',$this->status);
		$V0v5vsnfxezw->compare('description',$this->description,true);

		return new CActiveDataProvider($this, array(
			'criteria'=>$V0v5vsnfxezw,
		));
	}

	
	public static function model($Vgmajjibziuy=__CLASS__)
	{
		return parent::model($Vgmajjibziuy);
	}
}
